<html>
	<body>
	<%@ page import="java.sql.*,studentportal.*"%>

<%
			Connection con1=MySQLDriver.getConnection(); 
			con1.setAutoCommit(false);
			String query1="update book_borrow set from_date=NULL, to_date=NULL, status='R' where borrow_id="+request.getParameter("BBID");
			String query2="update book_master set book_status='N' where book_id="+request.getParameter("BID");
		    System.out.println("Query ----1"+query1);
		    System.out.println("Query ----1"+query2);
			PreparedStatement st1=con1.prepareStatement(query1);
			PreparedStatement st2=con1.prepareStatement(query2);
			int i=st1.executeUpdate(query1);
			int j=st2.executeUpdate(query2);
			if(i==1 && j==1)
			  con1.commit();
			  st1.close();
			  st2.close();
			  con1.close();

  %>
		
    <p align="center">&nbsp;</p>
    <p align="center">&nbsp;</p>
    <p align="center"><font size="6" color="#0066FF">Record Has Been
    Successfully Updated</font></p>
    <p align="center"><a href="Admin_Alloated_List_Book.jsp">Back</a></p>
	</body>
</html>
